/**
 * 
 */
package com.mbengue.corp.apr.ra.beans;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import com.mbengue.corp.apr.ra.core.Article;
import com.mbengue.corp.apr.ra.util.AprManagedBean;

/**
 * @author MMB11447
 *
 */
@ManagedBean(name = "articleRecent")
@SessionScoped
public class ArticleRecentBean extends AprManagedBean {

	private List<Article> articles;
	
	@PostConstruct
    public void init() {
		articles = new ArrayList<Article>();
		int size = 6;

        for(int i=1;i<=size;i++) {
        	Article article = new Article();
        	article.setTitre("titre" + i);
        	article.setResume("resume" + i);
        	articles.add(article);
        }
    }

	/**
	 * @return the articles
	 */
	public List<Article> getArticles() {
		return articles;
	}
}
